package com.lyn.dwjhb.convertor;

import java.io.BufferedWriter;
import java.io.IOException;

import org.apache.commons.dbutils.QueryRunner;


public abstract class BaseConvertor {
	
	protected QueryRunner rq = null;
	protected static int sorting = 100;
	
	public BaseConvertor() {
		super();
	}
	
	public BaseConvertor(QueryRunner rq) {
		super();
		this.rq = rq;
	}
	public String wrapper(String str) {
		return "'"+str+"'";
	}
	
	//helper:把一行字符串写入到文件
	public void writeLine(BufferedWriter bw, String sql) {
		try {
			bw.write(sql);
			bw.newLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}	
	
	
}
